package com.allwees.data.dataport.module.hearteat;

import com.allwees.bs.core.modelbase.vo.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class HeartbeatController {

    @GetMapping("/api/v1/app/heartbeat")
    public R appHeartbeat() {
        return R.ok("dataport app is alive!");
    }

    @GetMapping("/api/v1/es/heartbeat")
    public R esHeartbeat() {
        String heartbeat = "dataport es is alive!";

        return R.ok(heartbeat);
    }

    @GetMapping("/api/v1/mongo/heartbeat")
    public R mongoHeartbeat() {
        String heartbeat = "dataport mongo is alive!";
        return R.ok(heartbeat);
    }
}
